Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example 'aeon/analysis/' refactor #245

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

jkbhagatio
Copy link
Member

@jkbhagatio jkbhagatio commented Sep 3, 2023

Previously, 'aeon/analysis' contained 'plotting.py', 'movies.py' and 'utils.py'.

As a potential example of the type of refactoring referred to in #237 and SainsburyWellcomeCentre/aeon_scratchpad#8, here I've done the following:

  • Renamed 'aeon/analysis' to 'aeon/processing'
  • Combined 'aeon/analysis/movies.py' and 'aeon/io/video.py', and moved them as a single module to 'aeon/processing/core/video.py'
  • Also in 'aeon/processing/core', created 'core.py', into which I moved the visits, rate, get_events_rates, sessiontime, and distance functions previously in 'aeon/analysis/utils.py'
  • Moved the distancetravelled, and activepatch functions previously in 'aeon/analysis/utils.py' to 'aeon/processing/foraging.py'
  • Moved 'aeon/analysis/plotting.py' to the aeon_analysis repo, under 'aeon_analysis/core/plotting.py'
  • Created a placeholder 'aeon/processing/social/' subpackage which will contain functions related to training a multianimal sleap ID model, which I will work on in another branch
  • Moved 'aeon/schema/dataset.py' to 'aeon/docs/dataset.py'

@coderabbitai: ignore

@jkbhagatio jkbhagatio requested a review from glopesdev September 3, 2023 18:31
github-actions[bot]

This comment was marked as resolved.

@jkbhagatio
Copy link
Member Author

Combined 'aeon/analysis/movies.py' and 'aeon/io/video.py', and moved them as a single module to 'aeon/processing/core/video.py'

For this, the differentiation is that 'aeon/io/video.py' is actually doing I/O, while 'aeon/analysis/movies.py' is doing processing, so I would revert this. Another option for refactoring is to put the functions in 'aeon/io/video.py' as methods of the existing Video reader

@jkbhagatio
Copy link
Member Author

So we've decided to create separate 'aeon_analysis' and 'aeon_scratchpad' repos.

As a separate issue, we should create "lightweight" env dependencies for aeon_mecha in the pyproject.toml, such that the 'aeon' env can be installed minimally without the current set of dependencies (e.g. dj and related deps)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant